package com.bbzn.device.client.dao.announce;

import com.bbzn.device.client.dataobject.Announcement;
import java.util.Date;
import java.util.List;

import com.bbzn.device.client.dto.announce.AnnouncementDTO;
import org.apache.ibatis.annotations.Param;

public interface AnnouncementMapper {
    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Long id);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(Announcement record);

    int insertOrUpdate(Announcement record);

    int insertOrUpdateSelective(Announcement record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(Announcement record);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    Announcement selectByPrimaryKey(Long id);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(Announcement record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(Announcement record);

    List<Announcement> findByAll(Announcement announcement);

    int updateBatch(List<Announcement> list);

    int updateBatchSelective(List<Announcement> list);

    int batchInsert(@Param("list") List<Announcement> list);

    List<AnnouncementDTO> findAllByPage(AnnouncementDTO announcement);

    int findCountByPage(AnnouncementDTO list);
}